/**
 * Mongolass测试类
 */
const Mongolass = require('mongolass')
const mongolass = new Mongolass('mongodb://localhost:27017/test')

const User = mongolass.model('User', {
    name: {type: 'string'},
    age: {type: 'number'}
})

User
    .insertOne({name: 'leil', age: 28})
    .exec()
    .then(console.log)
    .catch(function (e) {
        console.error(e)
        console.error(e.stack)
    })